<template>
	<!-- <div class="index">首页</div> -->
	<!-- <FormGenerator :model="form" :formOption="formOption" /> -->
	<fc-designer ref="designer" height="100vh" />
	<form-create :rule="rule" v-model:api="fApi" :option="options" />
</template>

<script lang="tsx" setup>
import { ref } from "vue";
const fApi = ref();
const options = ref({
	onSubmit: (formData) => {
		alert(JSON.stringify(formData));
	},
	resetBtn: true,
});
const rule = [{"type":"input","field":"F0cmlxln35slaic","title":"姓名","info":"","$required":true,"props":{"clearable":false,"placeholder":"请输入"},"_fc_id":"id_Fy1wlxln35slajc","name":"ref_Fx61lxln35slakc","display":true,"hidden":false,"_fc_drag_tag":"input","validate":[{"type":"string","trigger":"change","validator":"","mode":"min","message":"请输入正确的姓名"}]},{"type":"inputNumber","field":"F6h3lxln38nhalc","title":"年龄","info":"","props":{"min":1,"max":10,"step":1,"placeholder":"请选择"},"_fc_id":"id_Fv7flxln38nhamc","name":"ref_F18klxln38nhanc","display":true,"hidden":false,"_fc_drag_tag":"inputNumber","value":1,"validate":[{"type":"number","trigger":"change","validator":"","mode":"min","message":"请选择正确的年龄","min":1}],"$required":true},{"type":"select","field":"F7jjlxln3bquaoc","title":"地址","info":"","effect":{"fetch":""},"$required":"请选择地址","options":[{"label":"成都","value":1},{"label":"广安","value":2},{"label":"南城","value":3}],"_fc_id":"id_F87mlxln3bquapc","name":"ref_Fbvflxln3bquaqc","display":true,"hidden":false,"_fc_drag_tag":"select","validate":[{"type":"string","trigger":"change","validator":"","mode":"min","message":"请输入正确的地址"}]}];
// const form = ref()
// const formOption = ref();
</script>

<style lang="scss">
.index {
	display: flex;
	justify-content: center;
}
</style>
